<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

  <h:body>

    <ui:composition template="./WEB-INF/view/template.xhtml">

      <ui:define name="contents">

        <h:panelGroup id="indexLeftColumn" layout="block">
          <h:panelGroup id="welcomeText" layout="block">
						<blockquote/>
            <h:outputFormat styleClass="font-size: larger">${bundle.greeting}</h:outputFormat>
						<blockquote/>
            <h:outputFormat >${bundle.introText}</h:outputFormat >
          </h:panelGroup>
        </h:panelGroup>

        <h:panelGroup id="indexRightColumn" layout="block">
          <c:forEach var="category" items="#{categoryFacade.findAll()}">
            <h:panelGroup styleClass="categoryBox" layout="block">


              <h:link outcome="category" >
                <f:param name="cid" value="#{category.id}" />

                <h:outputText styleClass="categoryLabel"></h:outputText>
                <h:panelGroup styleClass="categoryLabelText">
									${category.name}
								</h:panelGroup>

                <img src="${initParam.categoryImagePath}${category.name}.jpg"
                     alt="${category.name}" class="categoryImage"/>
              </h:link>

            </h:panelGroup>
          </c:forEach>
        </h:panelGroup>

      </ui:define>

    </ui:composition>

  </h:body>

</html>
